<?php
/*
 * Created on 08/07/2009
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
	include("Chapter.php");
	class Course{
		
		private $chapters = Array();
		
		function addChapter($chapt){
			array_push($this->chapters,$chapt);
		}
		
		function getChapter($id){
			foreach($this->chapters as $chapt)
			{
				if(strcmp($chapt->getId(), $id)==0)
					return $chapt;
			}
			echo "no llego<br>";
			return null;
		}
		
		function getChapters(){
			return $this->chapters;
		}
		
			
	}


?>
